/*****************************************************************************
 *
 * Copyright (c), 2004-2020,ShangHai Neotune Information Technology Co., Ltd.
 *
 * Module Name : v2_sys.h
 *
 * Author :    sean
 *
 * Date :    2004-02-05
 *
 * Version :    1.00
 *
 * Description :    
 *
 * Other :    
 *
 * Data Structure List: <Main Data Structure>
 *
 * Modification History
 * ---------------------------------------------------------------------------
 *  1: Data :      2004-02-05
 *    Author :     sean
 *    Version :    V100R001M00
 *    Modification : creation
 *
*****************************************************************************/

#ifndef _INCv2_sysh
#define _INCv2_sysh

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* includes */

#include "asn1.h"

/* defines */

#define    SNMP_STRING_MAX    255

/* Structure for sysOR table */

#define    MAX_DESC_STRING        255
#define MAX_OR_ENTRIES        255

typedef struct _sysOR {
    int             or_index;
    int             or_timestamp;
    char            *or_desc;
    OBJ_ID_T        or_objid;
    struct _sysOR   *or_next;
} sysOR_t;


/* function declarations  */

/* system group - GET */

OIDC_T *SNMP_Get_ObjectID(int *);
UINT_32_T SNMP_Get_SysTime(void);
UINT_32_T SNMP_Get_SysServices(void);
char *SNMP_Get_SysName(int *);
char *SNMP_Get_SysContact(int *);
char *SNMP_Get_SysLocation(int *);
char *SNMP_Get_SysDescr(int *);

/* system group - SET */

STATUS SNMP_Set_SysName(char *, int );
STATUS SNMP_Set_SysContact(char *, int );
STATUS SNMP_Set_SysLocation(char *, int );

/* snmp stats group - GET/SET */

UINT_32_T SNMP_Get_SnmpStat(int );
STATUS SNMP_Set_AuthenTraps(int );
int  SNMP_Get_AuthenTraps(void );

/* sysOR group - GET */

UINT_32_T SNMP_Get_SysORLastChange (void);
sysOR_t *SNMP_SysOR_Next(ulong_t );
sysOR_t *SNMP_SysOR_Lookup(int );
void SNMP_SysOR_Get_Index(sysOR_t *, int *);
void SNMP_SysOR_Get_Objid(sysOR_t *, OBJ_ID_T *);
void SNMP_SysOR_Get_Desc(sysOR_t *, char **, int *);
void SNMP_SysOR_Get_TimeStamp(sysOR_t *, UINT_32_T *);

/* sysOR group - SET (inernal use - not for instrumentation) */

sysOR_t *SNMP_SysOR_Create(void);
STATUS SNMP_SysOR_Install(sysOR_t *);
STATUS SNMP_SysOR_Set_Data(sysOR_t *, OBJ_ID_T *, char *, UINT_32_T );
void SNMP_SysOR_Destroy(sysOR_t *);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif    /* _INCv2_sysh */
